package vip.liux.gateway.filters.decrypt;

/**
 * 标准错误响应结构
 */
public record ApiErrorResponse(int code, String msg, Long serverTime) {
    public ApiErrorResponse(ErrorCode errorCode, String msg) {
        this(errorCode.code(), msg, System.currentTimeMillis());
    }

    public ApiErrorResponse(ErrorCode errorCode) {
        this(errorCode.code(), errorCode.defaultMsg(), System.currentTimeMillis());
    }
}